﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Micrhard.FMCG.Server.Interface;
using Microsoft.Practices.Unity;
using Micrhard.FMCG.Server.Models;
using Microhard.Permission.Interface;
using Microhard.Notifications.Filter;
using FluentValidation.Mvc;

namespace Microhard.FMCG.WebUI.Areas.Notice.Controllers
{
    public class NoticeController : MicroHardBaseController<NoticeModel>
    {
        private INotice _resp = null;
        [Dependency]
        public INotice Category
        {
            set
            {
                base._repository = value;
                _resp = value;
            }
            get
            {
                return _resp;
            }
        }

        [NotificationUserFilter(Order = 10)]
        public override ActionResult SaveCreate([CustomizeValidator(RuleSet = "Insert")]NoticeModel model, bool continueEditing, Core.DBUtility.ScopeResult scope)
        {
            return base.SaveCreate(model, continueEditing, scope);
        }

    }
}
